package com.lollipop.checkin.constant;

/**
 * 签到常量类
 * 定义签到相关的Redis键前缀和其他常量
 */
public class CheckInConstant {

    /**
     * 用户签到记录的Redis键前缀
     * 格式: checkin:user:{userId}:record
     */
    public static final String USER_CHECKIN_RECORD_KEY_PREFIX = "checkin:user:%s:record";

    /**
     * 用户连续签到天数的Redis键前缀
     * 格式: checkin:user:{userId}:continue_days
     */
    public static final String USER_CONTINUE_CHECKIN_DAYS_KEY_PREFIX = "checkin:user:%s:continue_days";

    /**
     * 用户签到总天数的Redis键前缀
     * 格式: checkin:user:{userId}:total_days
     */
    public static final String USER_TOTAL_CHECKIN_DAYS_KEY_PREFIX = "checkin:user:%s:total_days";

    /**
     * 签到活动的Redis键前缀
     * 格式: checkin:activity:{activityId}:users
     */
    public static final String ACTIVITY_CHECKIN_USERS_KEY_PREFIX = "checkin:activity:%s:users";

    /**
     * 签到成功的返回码
     */
    public static final int CHECKIN_SUCCESS = 200;

    /**
     * 已经签到的返回码
     */
    public static final int ALREADY_CHECKED_IN = 201;

    /**
     * 签到失败的返回码
     */
    public static final int CHECKIN_FAILED = 500;

    /**
     * 日期格式
     */
    public static final String DATE_FORMAT = "yyyy-MM-dd";
}